import os

#创建自动运行文件

file_names = os.listdir('./')
#print(file_names)
dir_list = []

for i in file_names:
    if os.path.isdir(i):
        dir_list.append(i)

print(dir_list)

for i in dir_list:
    if os.path.exists("./{}/doMD-ALL-lig-auto.py".format(i))==False:
        os.system("cp ./doMD-ALL-lig-auto.py ./{}/".format(i))


for i in dir_list:
    print("{}".format(i))   
    if os.path.exists("./{}/Pro_temp_H_box.gro".format(i))==False: 
        print("开始跑{}".format(i))       
        os.system("cd ./{} && echo 15 | python ./doMD-ALL-lig-auto.py pro.pdb 100".format(i))

        

    #os.system("cd ./{} && echo 13 | python3 ./doMD-ALL2.py pro.pdb 100".format(i))
